Electronic devices, such as computing systems with ever-increasing computing power, are using more power due to things such as faster processors and graphics cards. The central processing unit (CPU), and increasingly the graphics processing unit (GPU), have been major sources of power consumption in computing systems. CPUs in computers, such as desktops and laptops, utilize a large amount of power due to their complexity and speed, and often represent a significant portion of the total power consumed. While various energy-saving features have been implemented in computers, the overall power consumption of high-performance CPUs remains considerable, even when they are idle.
In many applications, the CPU and other components are idle much of the time, so idle power contributes significantly to overall system power usage. The typical CPU often spends a large fraction of time in an idle state where the entire CPU or various components in the CPU do not execute programmed instructions. Modern CPUs include dynamic clock speed adjustments, power gating, and other power control techniques that reduce the power consumption of the CPU when one or more components in the CPU are idled or utilized at less than full capacity. For example, in one operating mode, a CPU with four execution cores executes a series of program instructions with a single CPU core while the remaining cores are idle. The CPU reduces the clock speed of the idle cores, and optionally deactivates the idle cores completely, while the active core consumes more power during execution of the program instructions.
In order to save energy when the CPU is idle, the CPU may be instructed to enter a low-power mode that consumes less power. Each CPU may have different power modes, which may operate by cutting the clock signal and power from idle units inside the CPU. An idle processor is available to be put to sleep and, while in a sleep state, can save most of the energy it would otherwise consume from actively executing. The more units stopped (e.g., by reducing voltage or completely shutting down units), the more energy is saved. However, more time is required for the CPU to “wake up” and be fully operational again.
If more of the energy-saving potential of processor sleep states were realized, end user energy use could be reduced with no apparent sacrifice of functionality or productivity. Thus, effective management of sleep states and energy considerations are important in software application development for application energy performance. For example, the use of parallelization, merging tasks that are difficult to parallelize in a single instruction thread and avoidance of excessive synchronization among threads are strategies that can help reduce the number of sleep state transitions an application triggers. Ineffective management of sleep states can significantly increase an application's energy consumption by waking the CPU from sleep states unnecessarily.